<template>
	<view>
		<view class="user" v-if="isLogin===true">
			
			<u-avatar src="https://cdn.uviewui.com/uview/album/1.jpg" shape="circle" size="4em" height="4em"></u-avatar>

			<view class="info">
				<view class="username" v-text="userInfo.username"></view>
				<view class="uid">uid:123</view>
			</view>
		</view>
		<view class="user2" v-else>
				<navigator url="/pages/login/login">登录</navigator>
		</view>
	
		<u-cell-group>
			<u-cell icon="setting-fill" title="个人设置" url="/pages/tabBar/user/userInfo/userInfo"></u-cell>
			<u-cell title="退出登录" v-show="isLogin===true" @click="$store.commit('loginout')"></u-cell>
		</u-cell-group>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			
		},
		mounted() {
		}
	}
</script>

<style scoped>
.user{
	background-color: #03a9f4;
	height: 8em;
	display: flex;flex-direction: row;
    align-items: center;
	padding: 0 2em;
	color: aliceblue;
}
.user2{
	background-color: #03a9f4;
	height: 8em;
	padding: 0 2em;
	color: aliceblue;
	text-align: center;
	line-height: 8em;
}
.info{
	padding: 1em;
}
.username{
	font-size: 14px;
}
.uid{
	font-size: 12px;
}
</style>
